home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1985 December / 1985-12.d64 / variable saver (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  3KB  |  80 lines

  1. 100 rem"[255][255][255][255][255][255][255][255] dummy line for saved pointers.
  2. 110 [143] ***********************************
  3. 120 [143] **  home  budget  planning  aid  **
  4. 130 [143] ***********************************
  5. 140 [143] ***** if [255] still there, no variable pool pointers saved *****
  6. 150 [139][194]([194](43)[170][194](44)[172]256[170]7)[178]255[137]230
  7. 160 [143] ***** restore variable pool pointers *****
  8. 170 [151]45,[194]([194](43)[170][194](44)[172]256[170]6)
  9. 180 [151]46,[194]([194](43)[170][194](44)[172]256[170]7)
  10. 190 ps[178][194](43)[170][194](44)[172]256:[129]x[178]0[164]5
  11. 200 [151] 47[170]x,[194](ps[170]8[170]x):[130]
  12. 210 [151]55,[194](45):[151]56,[194](46)[170]4:[137]250: [143] faster save/load
  13. 220 [143] ***** perform first time initialization *****
  14. 230 [137]580
  15. 240 [143] ***** calculate and display *****
  16. 250 [153]cs$;:used[178]0:[129]i[178]0[164]ds
  17. 260 pc[178](amt(i)[173]amt(0)[170].005)[172]100
  18. 270 i$[178][201]([196](i)[170]" ",3)
  19. 280 a$[178][201]("   "[170][196](amt(i)),5)
  20. 290 pc$[178][201](" "[170][196]([181](pc)),3)
  21. 300 [153]i$;[200](item$(i)[170]fs$,fs);a$;
  22. 310 [139]i[177]0[167][153]pc$"%";:used[178]used[170]amt(i)
  23. 320 [153]:[130]
  24. 330 [153]"budgeted ="used;bs$;[181]((used[173]amt(0))[172]100);bs$"%"
  25. 340 left[178]amt(0)[171]used:[153]"remaining="left;bs$;[181]((left[173]amt(0))[172]100);bs$"%"
  26. 350 [143] ***** prompt for user changes *****
  27. 360 [153]rv$" chg "ro$"i"rv$"tem, "ro$"a"rv$"mt, "ro$"n"rv$"one?"ro$
  28. 370 [161]b$
  29. 380 [139]b$[178]"n" [137]470
  30. 390 [139]b$[178]"a" [137]420
  31. 400 [139]b$[178]"i" [137]440
  32. 410 [137]370
  33. 420 [153]"item #"rv$","ro$"actual amt":[133]z,a:[139]z[177]ds[167]420
  34. 430 amt(z)[178]a:[137]250
  35. 440 [153]"item #"rv$","ro$"item desc.":[133]z,z$:[139]z[177]ds[167]440
  36. 450 item$(z)[178][200](z$[170]fs$,fs):[137]250
  37. 460 [143] ***** prompt for save variables *****
  38. 470 [153]cu$rv$" save data+pgm y/n?  "
  39. 480 [161]x$:[139]x$[178]"n"[167][153]cu$rv$"sys"[196](sr)"  or goto100 to run.";:[128]
  40. 490 [139]x$[179][177]"y"[167]480
  41. 500 [143] ***** save variable pool pointers *****
  42. 510 [153]cs$"ready for save of program and variables to tape or disk."
  43. 520 [153]"after save, enter 'sys"sr"', or 'goto 100'."
  44. 530 ps[178][194](43)[170][194](44)[172]256:[129]x[178]0[164]7
  45. 540 [151] ps[170]6[170]x,[194](45[170]x):[130]
  46. 550 [151]45,[194](55):[151]46,[194](56)
  47. 560 [128]
  48. 570 [143] ***** first time variable initialization *****
  49. 580 [151]55,[194](45):[151]56,[194](46)[170]4:[156]: [143] faster save/load
  50. 590 [143] 256*4=1024 variable pool size
  51. 600 [143] *vic* sr=64802:ds=17:cs$=chr$(147):fs=9:fs$="........."
  52. 610 sr[178]64738:ds[178]19:cs$[178][199](147):fs[178]27:fs$[178]"..........................."
  53. 620 [153]cs$" ?net monthly income?"
  54. 630 [134]amt(ds),item$(ds)
  55. 640 [133] amt(0)
  56. 650 item$(0)[178]"*income* ":amt(0)[178][181](amt(0))
  57. 660 item$(1)[178]"housing  ":amt(1)[178]850
  58. 670 item$(2)[178]"groceries":amt(2)[178]100
  59. 680 item$(3)[178]"gas/elec.":amt(3)[178]53
  60. 690 item$(4)[178]"telephone":amt(4)[178]14
  61. 700 item$(5)[178]"loan #1  ":amt(5)[178]155
  62. 710 item$(6)[178]"loan #2  ":amt(6)[178]145
  63. 720 item$(7)[178]"gasoline ":amt(7)[178]20
  64. 730 item$(8)[178]"insurance":amt(8)[178]43
  65. 740 item$(9)[178]"car maint":amt(9)[178]12
  66. 750 item$(10)[178]"mc / visa":amt(10)[178]70
  67. 760 item$(11)[178]"donations":amt(11)[178]10
  68. 770 item$(12)[178]"clothing ":amt(12)[178]25
  69. 780 item$(13)[178]"education":amt(13)[178]83
  70. 790 item$(14)[178]"home repr":amt(14)[178]80
  71. 800 item$(15)[178]"recreat'n":amt(15)[178]60
  72. 810 item$(16)[178]"savings  ":amt(16)[178]100
  73. 820 item$(17)[178]"other    ":amt(17)[178]45
  74. 830 [143] *vic* leave out item 18 and 19
  75. 840 item$(18)[178]"other1   ":amt(18)[178]23
  76. 850 item$(19)[178]"other2   ":amt(19)[178]17
  77. 860 bs$[178][199](157):cu$[178][199](145):rv$[178][199](18):ro$[178][199](146)
  78. 870 [137]250
  79.